home *** CD-ROM | disk | FTP | other *** search
/ Pro Intralink 3.1 / Pro Intralink v3.1.iso / migration / migrate_chk < prev   
Encoding:
Text File  |  2001-11-27  |  1.5 KB  |  72 lines

  1. #!/bin/csh -f
  2. # 07-MAR-2000   I4.0.0.25   APB   $$1   Initial submission
  3. #
  4.  
  5. #---------------------------------------
  6. # Check the arguments
  7. #
  8.  
  9. if ($#argv != 2) then
  10.   echo "ERROR: Wrong parameters number."
  11.   exit 1
  12. endif
  13.  
  14. set LogFile=${2}
  15. set TclFile=${1}/migration/migrate_chk.tcl
  16.  
  17. cat < /dev/null > $LogFile
  18.  
  19. if ($status != 0) then
  20.   echo "ERROR: Can't create output file: $LogFile"
  21.   exit 1
  22. endif
  23.  
  24. #---------------------------------------
  25. # Main block
  26. #
  27.  
  28. if ($?PROI_HOME == 0) then
  29.   if ($?ORACLE_HOME == 0) then
  30.     echo "ERROR: Couldn't find environment variable ORACLE_HOME or PROI_HOME" >> $LogFile
  31.     exit 1
  32.   endif
  33.   setenv PROI_HOME $ORACLE_HOME
  34. endif
  35.  
  36. if (! -e ${TclFile}) then
  37.   echo "ERROR: Couldn't find file ${TclFile}" >> $LogFile
  38.   exit 1
  39. endif
  40.  
  41. set StructureTree="intralink/"
  42. set TclExec=${PROI_HOME}/${StructureTree}tools/bin/tclsh
  43.  
  44. if (! -e ${TclExec}) then
  45.   set StructureTree=""
  46.   set TclExec=${PROI_HOME}/${StructureTree}tools/bin/tclsh
  47.   if (! -e ${TclExec}) then
  48.     echo "ERROR: Couldn't find file ${TclExec}" >> $LogFile
  49.     exit 1
  50.   endif
  51. endif
  52.  
  53. set TclLibD=${PROI_HOME}/${StructureTree}tools/lib/tcl
  54.  
  55. if ($?TCL_LIBRARY == 0) then
  56.   if (! -d ${TclLibD}) then
  57.     echo "ERROR: Couldn't find directory ${TclLibD}" >> $LogFile
  58.     exit 1
  59.   else
  60.     setenv TCL_LIBRARY ${TclLibD}
  61.   endif
  62. else
  63.   if (! -d ${TCL_LIBRARY}) then
  64.     echo "ERROR: Couldn't find directory ${TCL_LIBRARY}" >> $LogFile
  65.     exit 1
  66.   endif
  67. endif
  68.  
  69. ${TclExec} ${TclFile} ${LogFile}
  70.  
  71. exit $status
  72.